package com.es.code.docmgr.enity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author jichf
 * @Description 文档 对象
 * @create 2021-11-05 9:29
 */

@Data
@Document(indexName = "es_document", createIndex = false)
public class ESDocument {
    @Id
    private Long id;
    /**
     * 主题域
     **/
    @Field(type = FieldType.Text)
    private String themeDomain;

    /**
     * 条目ID
     */
    private Long subId;

    /**
     * 章节名称
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String chapterName;

    /**
     * 章节内容
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String chapterContent;

}
